Skip to content

Conversation

@mikekistler
Copy link
Contributor

Motivation and Context

The current samples in the README do not work and do not even build successfully.

How Has This Been Tested?

The new code is copied from a project that has been tested with the MCP Inspector tool.

Breaking Changes

No breaking changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@mikekistler mikekistler marked this pull request as draft March 30, 2025 19:44
@mikekistler
Copy link
Contributor Author

I've converted this to a draft as there are still some problems with the second example. Specifically, I'm getting errors that look like this in the terminal window where I launched the inspector:

Error from MCP server: SyntaxError: Unexpected token '/', "/usr/local"... is not valid JSON
    at JSON.parse (<anonymous>)
    at deserializeMessage (file:///Users/mikekistler/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)
    at ReadBuffer.readMessage (file:///Users/mikekistler/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)
    at StdioClientTransport.processReadBuffer (file:///Users/mikekistler/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)
    at Socket.<anonymous> (file:///Users/mikekistler/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Also, these same examples appear in the src/ModelContextProtocol/README.md file. We should decide if we need the same examples both places or if we could only put them in one file and reference them from the other. If we decide to keep them in both files then the other file will need to be fixed as well.

@stephentoub
Copy link
Contributor

@mikekistler, I think your local repo needs to be sync'd. The readme you're editing has already progressed further in main, and the one in the src/mpc folder was already deleted.

(Also, fwiw, all the further issues I found in the readme are fixed in #126, but as that hasn't been merged yet, feel free to make changes separately.)

@mikekistler
Copy link
Contributor Author

Thanks @stephentoub ... I will wait for you to merge #126 and then fixup this PR to anything still missing.

@stephentoub
Copy link
Contributor

@mikekistler, my changes merged. Can you update your PR with whatever additional changes you'd like on top of that?

@stephentoub
Copy link
Contributor

@mikekistler, are you still planning to evolve this, or should we close it for now?

@mikekistler
Copy link
Contributor Author

Closing for now as there have been many improvements to the README.

@mikekistler mikekistler closed this Apr 8, 2025
@mikekistler mikekistler deleted the mdk/fix-readme branch September 17, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants